﻿<%@ Page Language="C#" MasterPageFile="~/adm-Master.Master" AutoEventWireup="true" CodeBehind="Author.aspx.cs" Inherits="BookStore.admin.Author" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="PageName">Author Manager</div>
    
<asp:Panel ID="pnView" runat="server">

<div class="Control">
    <ul>
        <li>
            <asp:LinkButton CssClass="vadd" ID="lbtAddT" runat="server" 
                onclick="lbtAddT_Click">Add new</asp:LinkButton>
        </li>
        <li> 
            <asp:LinkButton CssClass="vrefresh" ID="lbtRefreshT" runat="server" 
                onclick="lbtRefreshT_Click">Refesh</asp:LinkButton></li> 
        <li> 
            <a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">Back</a> 
        </li>
    </ul>
</div>
    <asp:GridView ID="gvAuthor" runat="server" AllowPaging="True" BorderWidth="1px" 
        PageSize="5" Width="100%" AutoGenerateColumns="False" 
        onrowdeleting="gvAuthor_RowDeleting" 
        onselectedindexchanging="gvAuthor_SelectedIndexChanging" 
        onpageindexchanging="gvAuthor_PageIndexChanging">
        <Columns>
            <asp:BoundField DataField="authorID" HeaderText="authorID" />
            <asp:BoundField DataField="authorName" HeaderText="Author Name" />
            <asp:BoundField DataField="address" HeaderText="Address" />
            <asp:BoundField DataField="phone" HeaderText="Phone" />
            <asp:CommandField ShowDeleteButton="True" />
            <asp:CommandField ShowSelectButton="True" />
        </Columns>
    </asp:GridView>
<div class="Control">
    <ul>
        <li>
            <asp:LinkButton CssClass="vadd" ID="lbtAddB" runat="server" 
                onclick="lbtAddT_Click">Add new</asp:LinkButton>
        </li> 
        <li>
            <asp:LinkButton CssClass="vrefresh" ID="lbtRefreshB" runat="server">Refesh</asp:LinkButton></li> 
        <li> 
            <a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">Back</a> 
        </li>
    </ul>
</div>
</asp:Panel>
<asp:Panel ID="pnUpdate" runat="server" Visible="False">
<table class="TableUpdate" border="1">
    <tr> 
        <td class="Control" colspan="2">
            <ul>
                <li>
                    <asp:LinkButton CssClass="uupdate" ID="lbtUpdateT" runat="server" 
                        onclick="LinkButton1_Click">Save</asp:LinkButton>
                </li> 
                <li> 
                    <a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">Back</a> 
                </li> 
            </ul>
        </td> 
    </tr>
    <tr> 
    <th> 
        &nbsp;</th>
    <td>
        <asp:TextBox ID="txtauthorID" runat="server" Visible="False"></asp:TextBox>
    </td>
     </tr>
    <tr> 
    <th> 
       <asp:Label ID="lblAuthor" runat="server" Text="Author Name :"></asp:Label>
    </th>
    <td>
       <asp:TextBox ID="txtauthorname" runat="server" CssClass="Text"></asp:TextBox>
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
            ControlToValidate="txtauthorname" ErrorMessage="not blank"></asp:RequiredFieldValidator>
    </td>
     </tr>
    <tr> 
       <th> 
            <asp:Label ID="lbladdress" runat="server" Text="Address :"></asp:Label>
       </th>
       <td>
            <asp:TextBox ID="txtaddress" runat="server" CssClass="Text"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ControlToValidate="txtaddress" ErrorMessage="not blank"></asp:RequiredFieldValidator>
       </td>
     </tr>
     <tr> 
        <th> 
            <asp:Label ID="lblphone" runat="server" Text="Phone :"></asp:Label>
        </th>
        <td>
            <asp:TextBox ID="txtPhone" runat="server" CssClass="Text"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                ControlToValidate="txtPhone" ErrorMessage="not blank"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                ControlToValidate="txtPhone" ErrorMessage="phone is invalid" 
                ValidationExpression="^0[0-9]{8,10}$"></asp:RegularExpressionValidator>
        </td>
        </tr>
     <tr> 
         <td class="Control" colspan="2">
             <ul>
                 <li>
                 <asp:LinkButton CssClass="uupdate" ID="LinkButton1" runat="server" 
                         onclick="LinkButton1_Click">Save</asp:LinkButton></li> <li> 
                 <a class="vback" href="javascript:void(0);" onclick="window.history.go(-1);">Back</a> 
                 </li> 
             </ul>
         </td> 
     </tr>
</table>
</asp:Panel>
</asp:Content>
